home *** CD-ROM | disk | FTP | other *** search
- CSMG(3I) Last changed: 2-5-98
-
-
- NNAAMMEE
- CCSSMMGG - Performs a conditional scalar merge
-
- SSYYNNOOPPSSIISS
- CCSSMMGG (([II==]_i,, [JJ==]_j,, [KK==]_k))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
-
- DDEESSCCRRIIPPTTIIOONN
- The CCSSMMGG intrinsic function merges _i and _j, controlled by the bit mask
- in _k. When a 1 bit appears in _k, the corresponding bit of _i becomes
- the corresponding bit of the result. When a 0 bit appears in _k, the
- corresponding bit of _j is taken. Therefore, CCSSMMGG((_i,, _j,, _k)) equals the
- following specification:
-
- (_i ..AANNDD.. _k)) ..OORR.. ((_j ..AANNDD.. ..NNOOTT.. _k)
-
- The CCSSMMGG function accepts the following arguments:
-
- _i First item to be merged. Can be of Boolean, integer, real, or
- Cray pointer type.
-
- If _i is of type integer or real, it must be of KKIINNDD==88 on UNICOS
- and UNICOS/mk systems. On IRIX systems, _i can be of KKIINNDD==44 or
- KKIINNDD==88, but it must be the same length as _j and _k.
-
- _j Second item to be merged. Can be of Boolean, integer, real, or
- Cray pointer type.
-
- If _j is of type integer or real, it must be of KKIINNDD==88 on UNICOS
- and UNICOS/mk systems. On IRIX systems, _j can be of KKIINNDD==44 or
- KKIINNDD==88, but it must be the same length as _i and _k.
-
- _k Bit mask. Can be of Boolean, integer, real, or Cray pointer
- type.
-
- If _k is of type integer or real, it must be of KKIINNDD==88 on UNICOS
- and UNICOS/mk systems. On IRIX systems, _k can be of KKIINNDD==44 or
- KKIINNDD==88, but it must be the same length as _i and _j.
-
- CCSSMMGG is an elemental function. The name of this intrinsic cannot be
- passed as an argument.
-
- NNOOTTEESS
- The CCSSMMGG intrinsic function is outmoded. Refer to the _F_o_r_t_r_a_n
- _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905, for
- information on outmoded features and their preferred standard
- alternatives.
-
- RREETTUURRNN VVAALLUUEESS
- The return value is of Boolean type.
-
- EEXXAAMMPPLLEESS
- Example 1: Specifying CCSSMMGG((_i,,_j,,MMAASSKK((6644)) or CCSSMMGG((_i,,_j,,--11)) returns ii.
-
- Example 2: CCSSMMGG((_i,,_j,,00)) returns _j.
-
- Example 3: Specifying the conditional scalar merge CCSSMMGG(( ''AABBCCDDEEFFGGHH''HH,,
- ''1122334455667788''HH,, XX''00000000FFFFFFFFFFFF00000000FFFF'' )) generates ''1122CCDDEE6677HH''HH as the
- result.
-
- Example 4: This example applies only to UNICOS systems.
-
- INTEGER EXPONENT,EXPMASK
- PARAMETER( EXPMASK = X'7FFF000000000000' )
- C Statement function:
- EXPONENT(X) = SHIFTR(X .AND. EXPMASK, 48)
- C Statement function:
- DIVBY2(X) =
- & CSMG( SHIFTL(EXPONENT(X)-1,48),
- & X,
- & EXPMASK )
-
- According to this example, a call to DDIIVVBBYY22((--2288..00)) yields -14.0.
-
- SSEEEE AALLSSOO
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-